Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-d3-dashboard-widgets is "dashboard-calendar">

With this node you can add a calendar to an existing dashboard or a new one created by the node to show a calendar.

Configurations

dashboard string
Dashboard title to which the calendar will be added
widget string
Title that will have the widget containing the calendar.

Inputs

A JSON array like the following:
[
    {
        "metricId": [Service Uri Of A Sensor],
        "metricHighLevelType": "Sensor",
        "metricName": [The name of the Sensor],
        "smField": [A measure recorded by the sensor],
        "serviceUri": [Service Uri Of A Sensor]
    },
    {
        "metricId": [The ID of a KPI],
        "metricHighLevelType": "MyKPI",
        "metricName": [The name of the MyKPI],
        "smField": [The type of the measure saved in the KPI],
        "serviceUri": [The ID of a KPI]
    },
    {
        "metricId": "",
        "metricHighLevelType": "Dynamic",
        "metricName": [The name of the dynamic data],
        "smField": [The type of the dynamic data],
        "metricValueUnit": [The unit of the dynamic data],
        "value": [An array of array of timestamp and value]
    }
]
        

You can insert an arbitrary number of MyKPI and Sensor element inside the array. An example of the JSON array filled with correct data:

[
    {
        "metricId": "serviceUri=http://www.disit.org/km4city/resource/IBIMET_SMART17",
        "metricHighLevelType": "Sensor",
        "metricName": "IBIMET_SMART12",
        "smField": "PM10",
        "serviceUri": "http://www.disit.org/km4city/resource/IBIMET_SMART17"
    },
    {
        "metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/IBIMET_SMART12&format=json",
        "metricHighLevelType": "Sensor",
        "metricName": "IBIMET_SMART12",
        "smField": "PM10",
        "serviceUri": "http://www.disit.org/km4city/resource/IBIMET_SMART12"
    },
    {
        "metricId": "17056191",
        "metricHighLevelType": "MyKPI",
        "metricName": "S4CTuscanyTrackerLocation",
        "smField": "GPS Information Saved From The App",
        "serviceUri": "17056191"
    },
    {
        "metricId": "",
        "metricHighLevelType": "Dynamic",
        "metricName": "BatteryTemperatureGalaxyNote",
        "smField": "Gradi Centigradi",
        "metricValueUnit": "°C",
        "values": [
                    [1580305500000, 19.5],
                    [1580301900000, 20.0],
                    [1580298300000, 20.5],
                    [1580294700000, 18.5],
                    [1580291100000, 19],
                    [1580287500000, 18.5],
                    [1580283900000, 21.5],
                    [1580280300000, 22.0],
                    [1580276700000, 19],
                    [1580273100000, 17.5],
                    [1580269500000, 16.5],
                    [1580265900000, 17.0],
                    [1580262300000, 18.5],
                    [1580258700000, 20.0],
                    [1580255100000, 19.5],
                    [1580251500000, 21.5],
                    [1580247900000, 21]
        ]
    }
]